<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@ page import="com.model.*"%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'dbc.jsp' starting page</title>
</head>
<body>
	<a href="register.jsp">添加用户</a> 
	<table border="1">
		<tr>
			<th>ID</th>
			<th>用户名</th>
			<th>密码</th>
			<th>操作</th>
		</tr>
		<%
			List<Users> userslist=(List<Users>)request.getAttribute("userslist");
			for (Users u : userslist) {
		%>
		<tr>
			<td><%=u.getId()%></td>
			<td><%=u.getUsername()%></td>
			<td><%=u.getPassword()%></td>
			<td><a href="UserManageServlet?function=delete&id=<%=u.getId()%>">删除</a>
			<a href="UserManageServlet?function=edit&id=<%=u.getId()%>">修改</a></td>
		</tr>
		<%
			}
		%>
	</table>
</body>
</html>
